<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/views1/DTD/views1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui">

	<ui:composition template="/views/layout/main.xhtml">
		<ui:define name="conteudo">
			<h:form id="formPrincipal">
				<div class="grid_18 div_48">
					<p:commandButton widgetVar="btn_Salvar" ajax="false" styleClass="save" action="#{professorBean.salvar}" title="Salvar" />
					<p:commandButton widgetVar="btn_Desistir" ajax="false" styleClass="cancel" immediate="true" action="#{professorBean.desistirEdit}" title="Cancelar" />
				</div>

				<div class="grid_18 titulo">Professores</div>

				<div class="grid_18">
					<p:messages id="mensages"/>
				</div>

				<div class="grid_4 div-label">Nome Completo:</div>
				<div class="grid_14 div-campo">
					<p:inputText id="professor_nomeCompleto"
						widgetVar="professor_nomeCompleto" styleClass="input-mg"
						required="true" validator="#{professorBean.validateNomeCompleto}"
						requiredMessage="O campo 'Nome Completo' não pode ser nulo!"
						value="#{professorBean.professorInstance.nomeCompleto}" />
				</div>

				<div class="grid_4 div-label">Email:</div>
				<div class="grid_14 div-campo">
					<p:inputText id="professor_email" widgetVar="professor_email"
						styleClass="input-mg" required="true"
						validator="#{professorBean.validateEmail}"
						requiredMessage="O campo 'Email' não pode ser nulo!"
						value="#{professorBean.professorInstance.email}" />
				</div>
			</h:form>
		</ui:define>
	</ui:composition>
</f:view>